
#include "axis.h"
#include "motor.h"

axis_t axis = {
    .current_state_ = AXIS_STATE_UNDEFINED,
    .motor = {
        .iphase_cali_times = 0,
    },
};

void run_state_machine_loop(axis_t *axis)
{
    uint8_t status = 0;

    switch (axis->current_state_)
    {
    case AXIS_STATE_UNDEFINED:
    {
        // motor_phase_current_calibration();
    }
    break;
    case AXIS_STATE_IDLE:
    {
    }
    break;
    case AXIS_STATE_MOTOR_CALIBRATION:
    {
    }
    break;
    case AXIS_STATE_CLOSED_LOOP_CONTROL:
    {
    }
    break;
    case AXIS_STATE_ENCODER_OFFSET_CALIBRATION:
    {
    }
    break;
    case AXIS_STATE_FAULT:
    {
    }
    break;
    default:

        break;
    }
}
